package com.xz.knowledgeDuplication.pattern.decorator;

/**
 * 鸡蛋类(具体装饰)
 *
 * @author 召
 * @date 2022-03-12 22:48:04
 */
public class Egg extends Garnish{

    public Egg(FastFood fastFood) {
        super(fastFood, 1, "鸡蛋");
    }

    @Override
    public float cost() {
        return getPrice() + getFastFood().getPrice();
    }

    @Override
    public String getDesc() {
        return super.getDesc() + getFastFood().getDesc();
    }
}
